package frame1;

public enum Demo {
	
	A(0),B(1),C(2),D(3),E(4),F(5);
	
	private int value;
	private Demo(int i){
		this.value = i;
	}
	
	public int getValue(){
		return this.value;
	}
	
	
	public static void main(String[] args) {
		Demo d = Demo.A;
		Demo b = Demo.B;
		if( d == b ){
			d.getValue();
		}
		switch( d ){
			case A:
				System.out.println("A");
				break;
			case B:
				System.out.println("B");
				break;
		}
	}

}
